package cn.wcy.design_patterns.creationtype01.builder03.demo2;

// Director类或Director角色（指导如何使用Builder来构建产品）
public class Director {
    private ComputerBuilder builder;

    public Director(ComputerBuilder builder) {
        this.builder = builder;
    }

    public void constructComputer() {
        builder.buildCPU();
        builder.buildMemory();
        builder.buildHardDrive();
    }

    public Computer getComputer() {
        return builder.getComputer();
    }
}
